{{include file="public/header" /}}

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form form-validation am-form-pure am-form-full-screen am-form-popup-fixed" action="{{:MyUrl('admin/goodsspectemplate/save')}}" method="POST" request-type="ajax-reload" request-value="parent">
			<div class="am-cf">
                <div class="am-u-sm-6 am-padding-horizontal-0">
                	<div class="am-form-group">
						<label>{{:MyLang('common_service.goodsspectemplate.form_item_name')}}<span class="am-form-group-label-tips-must">*</span></label>
						<input type="text" name="name" placeholder="{{:MyLang('common_service.goodsspectemplate.form_item_name_message')}}" minlength="1" maxlength="30" data-validation-message="{{:MyLang('common_service.goodsspectemplate.form_item_name_message')}}" class="am-radius" {{if !empty($data['name'])}} value="{{$data.name}}"{{/if}} required />
					</div>
                </div>
                <div class="am-u-sm-6 am-padding-horizontal-0">
                	<div class="am-form-group">
						<label class="am-block">{{:MyLang('common_service.goodsspectemplate.form_item_category_id')}}<span class="am-form-group-label-tips-must">*</span><span class="am-form-group-label-tips">{{:MyLang('common_service.goodsspectemplate.form_item_category_id_tips')}}</span></label>
						<select name="category_id" class="am-radius chosen-select" data-placeholder="{{:MyLang('please_select_tips')}}" data-validation-message="{{:MyLang('common_service.goodsspectemplate.form_item_category_id_message')}}" required>
							{{if !empty($goods_category_list)}}
								<option value="">{{:MyLang('please_select_tips')}}</option>
								{{foreach $goods_category_list as $v}}
									<option value="{{$v.id}}" {{if isset($data['category_id']) and $data['category_id'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
								{{/foreach}}
							{{/if}}
						</select>
					</div>
                </div>
            </div>

			<div class="am-form-group">
				<label>{{:MyLang('common_service.goodsspectemplate.form_item_content')}}<span class="am-form-group-label-tips-must">*</span></label>
				<input type="text" name="content" placeholder="{{:MyLang('common_service.goodsspectemplate.form_item_content_placeholder')}}" minlength="1" maxlength="1000" data-validation-message="{{:MyLang('common_service.goodsspectemplate.form_item_content_message')}}" class="am-radius" {{if !empty($data['content'])}} value="{{$data.content}}"{{/if}} required data-am-tagsinput />
			</div>
			{{include file="lib/is_enable" /}}

			<!-- 插件扩展数据 start -->
			{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                <div class="plugins-tag">
                    <span>plugins_view_admin_goods_spec_template_save</span>
                </div>
            {{/if}}
			{{if !empty($plugins_view_admin_goods_spec_template_save_data) and is_array($plugins_view_admin_goods_spec_template_save_data)}}
				<div class="am-alert am-alert-secondary">
					<label class="am-text-sm am-text-warning">{{:MyLang('plugins_view_region_config_tips')}}</label>
					<div>
						{{foreach $plugins_view_admin_goods_spec_template_save_data as $hook}}
		                    {{if is_string($hook) or is_int($hook)}}
		                        {{$hook|raw}}
		                    {{/if}}
		                {{/foreach}}
					</div>
				</div>
			{{/if}}
			<!-- 插件扩展数据 end -->

			<div class="am-form-popup-submit">
				<div class="am-padding-bottom-sm">
					<input type="hidden" name="id" {{if !empty($data['id'])}} value="{{$data.id}}"{{/if}} />
					<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'{{:MyLang('processing_tips')}}'}">{{:MyLang('save_title')}}</button>
				</div>
			</div>
		</form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->